<!-- ConfirmReceiptPopup.vue -->
<template>
  <view v-if="visible" class="confirm-receipt-popup">
    <view class="popup-mask" @click="closePopup"></view>
    <view class="popup-content">
      <view class="popup-title">温馨提示</view>
      <view class="popup-message">
        是否收到你喜爱的宠物呢~
      </view>
      <view class="button-container">
        <button class="btn cancel" @click="closePopup">取消</button>
        <button class="btn confirm" @click="confirmReceipt">确认收货</button>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  props: {
    visible: {
      type: Boolean,
      default: false
    }
  },
  methods: {
    closePopup() {
      this.$emit('close')
    },
    confirmReceipt() {
      this.$emit('confirm')
    }
  }
}
</script>

<style scoped>
.confirm-receipt-popup {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
}
.popup-mask {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
}
.popup-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #fff;
  border-radius: 10rpx;
  padding: 30rpx;
  width: 80%;
  max-width: 600rpx;
}
.popup-title {
  font-size: 36rpx;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20rpx;
}
.popup-message {
  font-size: 28rpx;
  text-align: center;
  margin-bottom: 30rpx;
}
.button-container {
  display: flex;
  justify-content: space-between;
}
.btn {
  width: 45%;
  padding: 20rpx 0;
  border-radius: 10rpx;
  font-size: 28rpx;
  text-align: center;
}
.cancel {
  background-color: #f0f0f0;
  color: #333;
}
.confirm {
  background-color: #ff6600;
  color: #fff;
}
</style>